<!DOCTYPE HTML>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>供应商平台</title>
</head>
<body class="tob-wrap">
	<div th:replace="common/top"></div>
	<article class="container container-c40-deal-order clearfix">
		<div th:replace="common/left::c_side"></div>
		<section class="content">
			<h3 class="m-top-bar">
			</h3>
			<div class="m-order-bar">
				<p>
					<strong>订单处理</strong>
					 <select name="orderStatus" id="orderStatus" th:value="${orderStatus}" onchange="changePurchaseOrder(this)">
	                    <option value="2" th:if="${orderStatus==2}" selected="selected">已完成订单</option>
	                    <option value="2" th:if="${orderStatus!=2}">已完成订单</option>
	                    <option value="1" th:if="${orderStatus==1}" selected="selected">待履行订单</option>
	                    <option value="1" th:if="${orderStatus!=1}">待履行订单</option>
	                    <option value="5" th:if="${orderStatus==5}" selected="selected">全部订单</option>
	                    <option value="5" th:if="${orderStatus!=5}">全部订单</option>
	                </select>
				</p>
			</div>
			<div class="m-table-sell" th:each="purchaseOrder:${purchaseOrderList}">
				<div class="m-table-cont"  >
					<table width="100%" summay="" cellpadding="0" cellspacing="0">
						<tbody>
							<tr>
								<td class="td-ul-order">
									 <div class="ul-wrap">
										<ul class="clearfix">
											<li><label for="">订单号 : </label> <span  th:text="${purchaseOrder.salesOrderNo}"></span>
											</li>
											<li><label for="">时间 : </label> <span th:if="${purchaseOrder.startTime ne null and purchaseOrder.expiredTime ne null}" th:text="${#dates.format(purchaseOrder.startTime, 'yyyy-MM-dd')}+'
							 至 '+${#dates.format(purchaseOrder.expiredTime, 'yyyy-MM-dd')}">
												 </span></li>
											<li><label for="">描述 : </label> <span th:text="${purchaseOrder.purchaseOrderDesc}"></span>
											</li>
											<li><label for="">供应商 : </label> <span th:text="${purchaseOrder.tCompany.companyName}"></span>
											</li>
											<li><label for="">总金额 : </label> <span  th:text="${purchaseOrder.price}"></span>
											</li>
											<li><label for="">到货地点 : </label> <span th:text="${purchaseOrder.deliverAddress}"></span>
											</li>
										</ul>
									</div>
								</td>
								<td class="td-rowspan" rowspan="2">
								<a class="btn btn-cyan" th:href="@{../client/preCreateOrder.htm(purchaseOrderID=${purchaseOrder.id})}">修改订单</a> <br />
									<!--<a class="btn btn-cyan" href="../client/preCreateOrder.htm?orderNo=123456">修改订单</a> <br /> -->
									<!--<a th:href="../client/preConfirmOrder.htm?orderNo=${test}">发货单确认</a> <br /> -->
									<a th:href="@{../client/preConfirmOrder.htm(purchaseOrderID=${purchaseOrder.id})}">发货单确认</a> <br /> 
									<a th:href="@{/client/preConfirmInvoice.htm(purchaseOrderID=${purchaseOrder.id})}">发票确认</a> <br /> 
									<a th:href="@{/client/preConfirmInvoice.htm(purchaseOrderID=${purchaseOrder.id})}">验收</a><br /> 
									<a th:href="@{/client/preOrderEstimate.htm(purchaseOrderID=${purchaseOrder.id})}">评价</a>								
								</td>
									</tr>
									<tr>
								<td  class="td-flow-bar">
									<div class="flow-bar">
										<span th:each="purchaseOrderPayment,index:${purchaseOrder.tPurchaseOrderPayment}" >
                           		    <span th:if="${index.count!=index.size} and ${purchaseOrderPayment.milestoneType==1}" th:text="待发货"  class="icon icon-flow-red" ></span> 
                                	<span th:if="${index.count!=index.size} and ${purchaseOrderPayment.milestoneType==2}" th:text="已发货"  class="icon icon-flow-green" ></span>
                                	<span th:if="${index.count!=index.size} and ${purchaseOrderPayment.milestoneType==3}" th:text="已验货"  class="icon icon-flow-green" ></span>
                                	<span th:if="${index.count!=index.size} and ${purchaseOrderPayment.milestoneType==4}" th:text="已验收"  class="icon icon-flow-green" ></span>
                                	<span th:if="${index.count!=index.size} and ${purchaseOrderPayment.milestoneType==5}" th:text="已收发票"  class="icon icon-flow-green" ></span> 
                                	<span th:if="${index.count!=index.size} and ${purchaseOrderPayment.milestoneType==6}" th:text="已付款"  class="icon icon-flow-green" ></span>  
                                	
                                	
                                	<span th:if="${index.count==index.size} and ${purchaseOrderPayment.milestoneType==1}" th:text="待发货"  class="icon-flow-simple-green01" ></span> 
                                	<span th:if="${index.count==index.size} and ${purchaseOrderPayment.milestoneType==2}" th:text="已发货"  class="icon-flow-simple-green01" ></span>
                                	<span th:if="${index.count==index.size} and ${purchaseOrderPayment.milestoneType==3}" th:text="已验货"  class="icon-flow-simple-green01" ></span>
                                	<span th:if="${index.count==index.size} and ${purchaseOrderPayment.milestoneType==4}" th:text="已验收"  class="icon-flow-simple-green02" ></span>
                                	<span th:if="${index.count==index.size} and ${purchaseOrderPayment.milestoneType==5}" th:text="已收发票"  class="icon-flow-simple-green02" ></span> 
                                	<span th:if="${index.count==index.size} and ${purchaseOrderPayment.milestoneType==6}" th:text="已付款"  class="icon-flow-simple-green02" ></span>
                              
                                </span>
                                									</div>
								</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</section>
	</article>
</body>
<script data-main="../js/page/b1_supplier"
	src="../lib/requirejs/require.js"></script>
	<script type="text/javascript" src="../lib/jquery/dist/jquery.js"></script>
	<script type="text/javascript" src="../js/page/b2_order.js"></script>
</html>